#ifndef CHARACTER_H
#define CHARACTER_H

#include "PhysicObject.h"

typedef enum
{
    FOOL_ENEMY = 0,
    NORMAL_ENEMY = 1,
    STONE_ENEMY = 2,
    BOW_ENEMY = 3,
    JAVELIN_ENEMY = 4
} ENEMY_TYPE;

typedef enum
{
    CHARACTER_IDLE,
    CHARACTER_FLY,
    CHARACTER_SWING,
    CHARACTER_PUMP,
    CHARACTER_SHOOTARROW,
    CHARACTER_THROWJAVELIN,
    CHARACTER_RELEASESTONE
} CHARACTER_STATE;



class Balloon;

class Character : public PhysicObject
{
public:
    Character();
    ~Character();

    virtual void createAction();
    virtual void createBalloon();

    virtual void beginContact(b2Fixture *ownFixture, b2Fixture *otherFixture, b2Contact *contact);
    virtual void endContact(b2Fixture *ownFixture, b2Fixture *otherFixture, b2Contact *contact);    

    virtual void changeState(unsigned char _state);
    virtual void characterFly(b2Vec2 _flyVector);
    virtual void removeObject();
    virtual void update(float dt);

public:
    Balloon *mBalloon;

    unsigned char charType;
    CHARACTER_STATE charState;
    GAME_DIRECTION direction;
    CCPoint flyForce;
    CCPoint maxVelocity;
    float maxAngularVelocity;
    bool isControllable;
};

#endif // CHARACTER_H
